package com.auemall.utils;

import java.util.Random;

import static com.auemall.utils.SecurityUtils.getSHA;

public class IDUtils {

    static Random random = new Random();

    public static String genUserToken(){
        return getSHA(System.currentTimeMillis() + "13hfaj12" + random.nextInt(100000));
    }

    public static String genRandom(int nMax){
        StringBuilder sCode = new StringBuilder();
        for(int i = 0;i < nMax ;i++){
            sCode.append((int)(Math.random() * 10));
        }
        return sCode.toString() ;
    }
}
